package com.meu.prontuario.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Year {
	
	private static int year;
	private static Year instance;
	
	public static Year getInstance() {
		if(instance == null){
			instance = new Year();
		}
		return instance;
	}
	
	public static int getYear() {
		return year;
	}
	
	public Year() {		
		Calendar date = Calendar.getInstance();
		SimpleDateFormat sdf = new SimpleDateFormat("yy");
		year =  Integer.parseInt(sdf.format(date.getTime()));
	}	
	
}
